<?php

Yii::import('application.models._base.BaseEarnedBidLog');


class EarnedBidLog extends BaseEarnedBidLog
{
	public static function model($className=__CLASS__) {
		return parent::model($className);
	}
		
	public function search_my(){
		$criteria = new CDbCriteria;
		$criteria->addCondition('customer_id='.yii::app()->user->id);
		$criteria->addCondition('bid_type = 1');
		$criteria->order= 'created desc';
		//$phistory=EarnedBidLog::model()->findAll( 'customer_id=:customer_id  and bid_type = 1',array(':customer_id'=>Yii::app()->user->id));
		return new CActiveDataProvider($this, array(
			'criteria' => $criteria,
			'pagination'=>array(
				'pageSize'=>5, //当前页数显示记录条数
				),

		));
	}
}